<template>
  <div style="width:95%;margin: 10px auto;">
    <el-row style="height: 60px;">
      <el-input
        placeholder="请输入内容"
        prefix-icon="el-icon-search"
        style="width:200px;float:right;margin-right: 10px">
      </el-input>
      <el-button @click="showChart">显示图表</el-button>
    </el-row>
    <el-row style="height: 500px;width: 700px">
      <div id="echarts">
        <chartDialog :chart-visible="chartVisible" ref="chart"></chartDialog>
      </div>
    </el-row> 
    <!--<el-row>-->
    <!--<v-container grid-list-xl text-xs-center>-->
    <!--<v-layout row wrap>-->
    <!--<v-flex xs12 sm6 md4 lg3 v-for="card in cards" :key="card.id" style="padding:0 0 24px 0">-->
    <!--<allProject :card="card" ></allProject>-->
    <!--</v-flex>-->
    <!--</v-layout>-->
    <!--</v-container>-->
    <!--</el-row>-->
  </div>
</template>

<script>
  import projectCard from '../../components/card/projectCard.vue'
  import chartDialog from '../../components/dialog/chartDialog'
  // import rasterCharts from '../../components/echarts/rasterChart'

  export default {
    name: 'allproject',
    components: {
      "allProject": projectCard,
      // "Chart": rasterCharts
      "chartDialog": chartDialog
    },
    data() {
      return {
        cards: null,
        chartVisible: {
          v:false
        },
      }
    },
    methods: {
      showChart() {
        this.$Bus.$emit('chartVisible.v',true);
      },
      getAllProjects: function () {
        //TODO 数据查询及处理
        // this.$refs.allprojectTable.getProjectData();
        let that = this;
        that.$axios.get('../../../static/json/allprojectData.json', {
          userid: sessionStorage.getItem("userid")
        }).then(function (res) {
          console.log(res);
          that.cards = res;
        }).catch(function (err) {
          console.log(err);
        })
      },
    },
    mounted() {

    }
  }
</script>
<style>
  .el-input--prefix .el-input__inner {
    border-radius: 20px;
  }
</style>
